home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / casm / au116-as.exe / PATCH.CPP < prev    next >
C/C++ Source or Header  |  1994-06-05  |  2KB  |  57 lines

  1. // PATCH.CPP                                 1          1    6666
  2. // Dave Harris                                11         11   6
  3. // Compiled using Borland C++ ver 3.1       1 1        1 1   6666
  4. // 03-03-94                                  1     ..   1   6   6
  5. //                                           11111 .. 11111  666
  6. ////////////////////////////////////////////////////////////////////////
  7.  
  8. #include "au.hpp"
  9. #include <time.h>
  10.  
  11. #define PROGRAM "PATCH"  // Name of module
  12. /*********************************************************************/
  13.  
  14. /*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*/
  15. static int patch(AU *au, char *file_name)
  16. {
  17.     check_for_key();
  18.  
  19.     au_printf(au, "@?6Processing @?1%-*s@?H\n", FILE_SIZE+2, file_name); // display file name
  20.     au->number_processed++;
  21.     fix_flist(au, file_name, file_name);
  22.     return 0;
  23. }
  24. /*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*/
  25. static BYTE parse_comm_line(AU *au, char option, char *, PARSE_TYPE type)
  26. {
  27.     switch (type)
  28.     {
  29.     case PARSE_PARAM_OPTION:
  30.         switch (option)
  31.         {
  32.         case '?':
  33.             au_standard_opt_header(au, "Patch", NULL);
  34.             exit (0);
  35.         default:
  36.             au_invalid_option(au, PROGRAM, option);
  37.         }
  38.         return TRUE;
  39.     }
  40.     return FALSE;
  41. }
  42. /*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*/
  43. int main_patch(AU *au, int argc, char *argv[])
  44. {
  45.     au->allow_rename = FALSE;      // no sense since unarcers not called
  46.  
  47.     ReadGlobalCFGInfo(au, au->cfg_file, PROGRAM, NULL);
  48.     generic_parse_comm_line(au, argc, argv, parse_comm_line);
  49.     process_files(au, patch);
  50.  
  51.     if (!au->no_extra)
  52.         au_printf_c(au, 15, "\nFiles Processed = %d\n", au->number_processed);
  53.  
  54.     return 0;
  55. }
  56.  
  57.